<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<%@include file="/views/common/include/taglib.jsp"%>
<%@include file="/views/common/include/head.jsp"%>
<link rel="stylesheet" href="${ctx}/css/page/header2.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/reset.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/wuye.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/footer.css" type="text/css">
<script src="${ctx}/js/controllers/property/main_property.js" type="text/javascript"></script>
</head>
<body>
 <script type="text/javascript">
		var ctx = '${ctx}';
	</script>
 <jsp:include page="/views/common/head_main.jsp" />
 <div class="bg">
  <div class="contentbox1 contentbox">
   <img src="${ctx}/images/page/w1.png">
  </div>
  <div class="contentbox2 contentbox">
   <div class="wid">
    <div class="wyfee wybox">
     <img src="${ctx}/images/page/jwy.png">
     <div class="padd">
      <table class="chargetable" cellspacing="0" cellpadding="5">
       <tr class="trpadd">
        <td>住户选择：</td>
        <td><select class="choice" id="property_house" onchange="getHouseInfo()">
          <c:forEach items="${houses}" var="item" varStatus="cStatus">
           <option value="${item.id}">${item.fullName}</option>
          </c:forEach>
        </select></td>
       </tr>
       <tr>
        <td class="middletr">当前状态：</td>
        <td class="colortext middletr" id="houseInfo"></td>
       </tr>
       <tr>
        <td class="btntr" colspan="2">
         <button onclick="goToMyBillPage();" class="anniu">缴费</button>
        </td>
       </tr>
       <!-- <tr>
        <td class="btntr" colspan="2"><button onclick="testWhetherHasRight();" class="anniu">缴费</button></td>
       </tr> -->
      </table>
     </div>
    </div>

    <div class="pfee wybox">
     <img src="${ctx}/images/page/tc.png">
     <div class="padd">
      <table class="chargetable" cellspacing="0" cellpadding="0">
       <tr class="trpadd">
        <td>车辆选择：</td>
        <td><select class="choice" id="property_cars" onchange="getCarInfo()">
          <c:forEach items="${cars}" var="item" varStatus="cStatus">
           <option value="${item.carNo}">${item.carNo}</option>
          </c:forEach>
        </select></td>
       </tr>
       <tr>
        <td class="middletr">当前状态：</td>
        <td class="middletr" id="carInfo"></td>
       </tr>
       <tr>
        <td class="btntr" colspan="2"><button onclick="goToPayCarBillPage();" class="anniu">续费</button>&nbsp;&nbsp;&nbsp;
         <button class="anniu" onclick="goToCarBillPage();">添加车辆</button></td>
       </tr>
      </table>
     </div>
    </div>

    <div class="feebox">
     <div class="water">
      <a href="https://jiaofei.alipay.com/fare/ebppChargeEntering.htm?chargeType=water&province=%ba%fe%b1%b1&city=%ce%e4%ba%ba"><img  src="${ctx}/images/page/w2.png" /></a>
      <button class="fee" onclick="waterFee();">缴水费</button>
     </div>
     <div class="elec">
      <a href="https://jiaofei.alipay.com/fare/ebppChargeEntering.htm?chargeType=water&province=%ba%fe%b1%b1&city=%ce%e4%ba%ba" ><img  src="${ctx}/images/page/w7.png" /></a>
      <button class="fee" onclick="electricCharge();">缴电费</button>
     </div>
    </div>
   </div>

   <div class="estate">
    <img src="${ctx}/images/page/wybaoxiu.png">
    <div class="padd">
     <div class="con">
      <img src="${ctx}/images/page/w8.png" />
      <div class="textbox">
       <div class="phone">物业报修热线：（027）1234-4321</div>
       <div class="problembox">
        <p>
         <span>物业报修常见问题：</span>
         <button class="more" onclick="gotoRepairList();">更多…</button>
        </p>
        <ul>
         <c:forEach items="${helpManuals}" var="item" varStatus="itemStatus">
          <c:if test="${itemStatus.index <7}">
           <li><a class="a-listForRepair" href="${ctx}/usualQuestions/infoList"> <span class="nunberbox">${itemStatus.index + 1}</span>${item.title}
           </a></li>
          </c:if>
         </c:forEach>
        </ul>
        <button class="bx" onclick="goToPropertyRepair();">报修</button>
       </div>

      </div>
     </div>
    </div>
    <div class="bluebox"></div>
   </div>

   <div class="complain">
    <img src="${ctx}/images/page/wyts.png">
    <div class="padd">
     <div class="con">
      <img src="${ctx}/images/page/tousu.png" />
      <div class="textbox">
       <div class="phone">投诉电话：（027）1234-4321</div>
       <div class="problembox">
        <p>
         <span>我的物业投诉：</span>
         <button class="more" onclick="gotoPropertySuggestionList();">更多…</button>
        </p>
        <ul>
         <c:forEach items="${complaintsInfos}" var="item" varStatus="itemStatus">
          <c:if test="${itemStatus.index <7}">
           <li><a class="a-listForRepair" href="${ctx}/propertySuggestion/infoList"> <span class="nunberbox">${itemStatus.index + 1}</span>${item.title}
           </a></li>
          </c:if>
         </c:forEach>
        </ul>
        <button class="bx" onclick="goToPropertySuggestion();">投诉</button>
       </div>

      </div>
     </div>
    </div>
    <div class="bluebox"></div>
   </div>
  </div>
 </div>
 <jsp:include page="/views/common/footer.jsp" />
 <script type="text/javascript">
		function goToPropertySuggestion() {
			parent.window.location.href = ctx
					+ "/propertySuggestion/goToEditPage";
		}
		function goToPropertyRepair() {
			parent.window.location.href = ctx + "/propertyRepair/goToEditPage";
		}
		function gotoRepairList() {
			parent.window.location.href = ctx + "/usualQuestions/infoList";
		}
		function gotoPropertySuggestionList() {
			parent.window.location.href = ctx + "/propertySuggestion/infoList";
		}
	</script>
 <script type="text/javascript">
		function goToMyBillPage() {
			  $.get(ctx+"/checkPropertyRightByCellId",function(data){
                    data = JSON.parse(data);
	                if(data.success){
	                	parent.window.location.href = ctx + "/propertyBill/getMyBill?payBill=1";
	                }else{
	                    layer.msg(data.msg, {icon: 5});
	                }
	            });
			
		}
	</script>
 <script type="text/javascript">
		function goToCarBillPage() {
			 $.get(ctx+"/checkCarRightByCellId",function(data){
				 data = JSON.parse(data);
                 if(data.success){
                	 parent.window.location.href = ctx + "/carBill/getCarManage";
                 }else{
                     layer.msg(data.msg, {icon: 5});
                 }
             });
			
		}
	</script>
 <script type="text/javascript">
		function goToPayCarBillPage() {
			 $.get(ctx+"/checkCarRightByCellId",function(data){
                    data = JSON.parse(data);
	                if(data.success){
	                	parent.window.location.href = ctx + "/carBill/getCarManage?payCarBill=1";
	                }else{
	                    layer.msg(data.msg, {icon: 5});
	                }
	            });
		}
	</script>
 <script type="text/javascript">
	function testWhetherHasRight(){
            $.get(ctx+"/checkCarRightByCellId",function(data){
            	data = JSON.parse(data);
                if(data.success){
                	parent.window.location.href = ctx + "/propertyBill/getMyBill";
                }else{
                    layer.msg(data.msg, {icon: 5});
                }
            });
    }
	</script>
  <script type="text/javascript">
        function waterFee() {
            layer.msg("本小区不支持缴纳水费！！！", {icon: 5});
        }
    </script>
    <script type="text/javascript">
        function electricCharge() {
            layer.msg("本小区不支持缴纳电费！！！", {icon: 5});
        }
    </script>
 <!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
 <script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
</body>
</html>